import React, { Component } from 'react'

class SomeComponent extends Component {
  render () {
    console.log('子组件刷新了')
    return (
      <div>SomeComponent</div>
    )
  }
}
export default class App extends Component {
  state = { count: 10 }
  add = () => {
    this.setState({
      count: this.state.count + 10
    })
  }
  render() {
    return (
      <div>
        <button onClick = { this.add }>加</button>
        <SomeComponent style = { { fontSize: 14 }} doSomething = { () => {
          console.log('do something')
        }} />
      </div>
    )
  }
}
